﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace HaumDisplay
{
    public partial class HaumPixelInfo : Form
    {
        public HaumPixelInfo()
        {
            InitializeComponent();
            this.DoubleBuffered = true;
        }

        /// <summary>
        /// 设置像素信息
        /// </summary>
        /// <param name="xy">像素XY坐标</param>
        /// <param name="rgb">像素rgb</param>
        /// <param name="Location">显示位置</param>
        public void SetPixelInfo(Point xy, Color rgb, Point Location)
        {
            label_xy.Text = $"X:{xy.X} Y:{xy.Y}";
            label_rgb.Text = $"R:{rgb.R} G:{rgb.G} B:{rgb.B}";
            this.Location = Location;
            this.SetTopLevel(true);
        }
    }
}
